package pers.shuxiao.eureka.controllers;

import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: xiao.shu
 * @Date: 2018/11/6 11:56
 * @Description:
 * @Copyright (c)
 */
@RestController
public class SXController {

    @Autowired
    DiscoveryClient discoveryClient;

    @GetMapping("/sx")
    public String sx() {
        String service = "service" + discoveryClient.getServices();
        System.out.println(service);
        return service;
    }
}
